package gui;

import javax.swing.*;

public class CustomWindowIcon {
    public static void setIcon(JFrame frame) {

        // Load custom icon
        ImageIcon customIcon = new ImageIcon(CustomWindowIcon.class.getResource("/images/icon.jpg"));

        // Set the custom icon for the JFrame
        frame.setIconImage(customIcon.getImage());

        // Add components, set size, etc.
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(400, 300);
        frame.setLocationRelativeTo(null); // Center the frame
        frame.setVisible(true);
    }
}
